package com.zhiche.lisa.bms.dao.model.bill;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 客户或承运商账单
 * </p>
 *
 * @author liuanshun
 * @since 2018-09-12
 */
@TableName("lisa_bill_io")
public class BillIo extends Model<BillIo> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 账单编号
     */
	@TableField("bill_code")
	private String billCode;
    /**
     * 账单属性：(0正式/1差价/2调整/3单费用)
     */
	@TableField("bill_prop")
	private Integer billProp;
    /**
     * 账期
     */
	@TableField("bill_month")
	private String billMonth;
    /**
     * 实收/付金额
     */
	@TableField("actual_money")
	private BigDecimal actualMoney;
    /**
     * 付款方ID
     */
	@TableField("payer_id")
	private Long payerId;
    /**
     * 付款方名称
     */
	@TableField("payer_name")
	private String payerName;
    /**
     * 收款方ID
     */
	@TableField("payee_id")
	private Long payeeId;
    /**
     * 收款方名称
     */
	@TableField("payee_name")
	private String payeeName;
    /**
     * 账单类型：应收账单、应付账单
     */
	@TableField("bill_type")
	private String billType;
    /**
     * 账单状态：10-未对账 20-已出账, 30-已确认, 40-已结算, 50-已取消
     */
	@TableField("bill_status")
	private String billStatus;
    /**
     * 账单总金额
     */
	@TableField("gross_amt")
	private BigDecimal grossAmt;
    /**
     * 账单版本
     */
	@TableField("bill_version")
	private Long billVersion;
    /**
     * 总数量
     */
	private Integer num;
    /**
     * 来源系统：0、bms 1、手工导入
     */
	@TableField("source_system")
	private Integer sourceSystem;
	private Long creator;
    /**
     * 出账日期
     */
	@TableField("publish_time")
	private Date publishTime;
    /**
     * 拥有者id
     */
	private Long proprietor;
    /**
     * 租户id
     */
	@TableField("tenant_id")
	private Long tenantId;
    /**
     * 创建时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;
    /**
     * 修改时间
     */
	@TableField("gmt_modify")
	private Date gmtModify;
    /**
     * 下发时间
     */
	@TableField("receipt_date")
	private Date receiptDate;
    /**
     * 源文件ID(针对手工上传账单场景)
     */
	@TableField("source_id")
	private String sourceId;
    /**
     * 是否删除 0、否  1、是
     */
	@TableField("is_delete")
	@TableLogic
	private Integer isDelete;
    /**
     * 客户是否确认；0-否 1-是 2-取消
     */
	@TableField("is_affirm")
	private Integer isAffirm;

	/**
	 * 车队id
	 */
	@TableField("fleet_id")
	@JsonSerialize(using=ToStringSerializer.class)
	private Long fleetId;

	/**
	 * 车队名称
	 */
	@TableField("fleet_name")
	private String fleetName;

	/**
	 * 计划对账时间
	 */
	@TableField("plan_account_check_date")
	private Date planAccountCheckDate;

	public Long getFleetId () {
		return fleetId;
	}

	public void setFleetId (Long fleetId) {
		this.fleetId = fleetId;
	}

	public String getFleetName () {
		return fleetName;
	}

	public void setFleetName (String fleetName) {
		this.fleetName = fleetName;
	}

	public Date getPlanAccountCheckDate () {
		return planAccountCheckDate;
	}

	public void setPlanAccountCheckDate (Date planAccountCheckDate) {
		this.planAccountCheckDate = planAccountCheckDate;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getBillCode() {
		return billCode;
	}

	public void setBillCode(String billCode) {
		this.billCode = billCode;
	}

	public Integer getBillProp() {
		return billProp;
	}

	public void setBillProp(Integer billProp) {
		this.billProp = billProp;
	}

	public String getBillMonth() {
		return billMonth;
	}

	public void setBillMonth(String billMonth) {
		this.billMonth = billMonth;
	}

	public BigDecimal getActualMoney() {
		return actualMoney;
	}

	public void setActualMoney(BigDecimal actualMoney) {
		this.actualMoney = actualMoney;
	}

	public Long getPayerId() {
		return payerId;
	}

	public void setPayerId(Long payerId) {
		this.payerId = payerId;
	}

	public String getPayerName() {
		return payerName;
	}

	public void setPayerName(String payerName) {
		this.payerName = payerName;
	}

	public Long getPayeeId() {
		return payeeId;
	}

	public void setPayeeId(Long payeeId) {
		this.payeeId = payeeId;
	}

	public String getPayeeName() {
		return payeeName;
	}

	public void setPayeeName(String payeeName) {
		this.payeeName = payeeName;
	}

	public String getBillType() {
		return billType;
	}

	public void setBillType(String billType) {
		this.billType = billType;
	}

	public String getBillStatus() {
		return billStatus;
	}

	public void setBillStatus(String billStatus) {
		this.billStatus = billStatus;
	}

	public BigDecimal getGrossAmt() {
		return grossAmt;
	}

	public void setGrossAmt(BigDecimal grossAmt) {
		this.grossAmt = grossAmt;
	}

	public Long getBillVersion() {
		return billVersion;
	}

	public void setBillVersion(Long billVersion) {
		this.billVersion = billVersion;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Integer getSourceSystem() {
		return sourceSystem;
	}

	public void setSourceSystem(Integer sourceSystem) {
		this.sourceSystem = sourceSystem;
	}

	public Long getCreator() {
		return creator;
	}

	public void setCreator(Long creator) {
		this.creator = creator;
	}

	public Date getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}

	public Long getProprietor() {
		return proprietor;
	}

	public void setProprietor(Long proprietor) {
		this.proprietor = proprietor;
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public Date getGmtModify() {
		return gmtModify;
	}

	public void setGmtModify(Date gmtModify) {
		this.gmtModify = gmtModify;
	}

	public Date getReceiptDate() {
		return receiptDate;
	}

	public void setReceiptDate(Date receiptDate) {
		this.receiptDate = receiptDate;
	}

	public String getSourceId() {
		return sourceId;
	}

	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Integer getIsAffirm() {
		return isAffirm;
	}

	public void setIsAffirm(Integer isAffirm) {
		this.isAffirm = isAffirm;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString () {
		final StringBuffer sb = new StringBuffer("BillIo{");
		sb.append("id=").append(id);
		sb.append(", billCode='").append(billCode).append('\'');
		sb.append(", billProp=").append(billProp);
		sb.append(", billMonth='").append(billMonth).append('\'');
		sb.append(", actualMoney=").append(actualMoney);
		sb.append(", payerId=").append(payerId);
		sb.append(", payerName='").append(payerName).append('\'');
		sb.append(", payeeId=").append(payeeId);
		sb.append(", payeeName='").append(payeeName).append('\'');
		sb.append(", billType='").append(billType).append('\'');
		sb.append(", billStatus='").append(billStatus).append('\'');
		sb.append(", grossAmt=").append(grossAmt);
		sb.append(", billVersion=").append(billVersion);
		sb.append(", num=").append(num);
		sb.append(", sourceSystem=").append(sourceSystem);
		sb.append(", creator=").append(creator);
		sb.append(", publishTime=").append(publishTime);
		sb.append(", proprietor=").append(proprietor);
		sb.append(", tenantId=").append(tenantId);
		sb.append(", gmtCreate=").append(gmtCreate);
		sb.append(", gmtModify=").append(gmtModify);
		sb.append(", receiptDate=").append(receiptDate);
		sb.append(", sourceId='").append(sourceId).append('\'');
		sb.append(", isDelete=").append(isDelete);
		sb.append(", isAffirm=").append(isAffirm);
		sb.append(", fleetId='").append(fleetId).append('\'');
		sb.append(", fleetName='").append(fleetName).append('\'');
		sb.append(", planAccountCheckDate=").append(planAccountCheckDate);
		sb.append('}');
		return sb.toString();
	}
}
